package model;

import java.sql.Timestamp;

public class Record {
	
	private static int currentId = 0;
	
	private int id;
	private String shop;
	private String customer;
	private Timestamp time;
	private int goodsId;
	private String goodsName;
	private int quantity;
	private float price;
	
	public Record() {
		id = 0;
		shop = null;
		customer = null;
		time = null;
		goodsId = 0;
		goodsName = null;
		quantity = 0;
		price = 0;
	}
	
	public Record(String s, String c, Timestamp d, int g, String n, int q, float p) {
		currentId++;
		id = currentId;
		shop = s;
		customer = c;
		time = d;
		goodsId = g;
		goodsName = n;
		quantity = q;
		price = p;
	}
	
	public Record(int i, String s, String c, Timestamp d, int g, String n, int q, float p) {
		id = i;
		shop = s;
		customer = c;
		time = d;
		goodsId = g;
		goodsName = n;
		quantity = q;
		price = p;
	}
	
	public int getId() {
		return id;
	}
	
	public void setId(int i) {
		id = i;
	}
	
	public String getShop() {
		return shop;
	}
	
	public void setShop(String s) {
		shop = s;
	}
	
	public String getCustomer() {
		return customer;
	}
	
	public void setCustomer(String s) {
		customer = s;
	}
	
	public Timestamp getTime() {
		return time;
	}
	
	public void setTime(long l) {
		time = new Timestamp(l);
	}
	
	public int getGoodsId() {
		return goodsId;
	}
	
	public void setGoodsId(int i) {
		goodsId = i;
	}
	
	public String getGoodsName() {
		return goodsName;
	}
	
	public void setGoodsName(String n) {
		goodsName = n;
	}
	
	public int getQuantity() {
		return quantity;
	}
	
	public void setQuantity(int i) {
		quantity = i;
	}
	
	public float getPrice() {
		return price;
	}
	
	public void setPrice(float f) {
		price = f;
	}

}
